﻿
@{
    ViewBag.Title = "IssueReportAdd";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}

@section css {
    <link href="~/Assets/css/lib/bootstrap-select.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/bootstrap-datetimepicker.min.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/fileinput.css" rel="stylesheet" />
    <style>
        th {
            text-align: center;
            font-weight: bold;
        }

        td {
            text-align: center;
            vertical-align: middle;
        }
    </style>
}
<div class="page-content" ng-cloak ng-controller="EmergencyController" ng-init="AddModel={};
     Id='@(Request.QueryString["Id"].IsEmpty() ? "" : Request.QueryString["Id"])';
     page='@(Request.QueryString["page"].IsEmpty() ? "1" : Request.QueryString["page"])';
     PageName='@Request.CurrentExecutionFilePath.Substring(Request.CurrentExecutionFilePath.LastIndexOf("/") + 1)';
     GetParkList();     
     
     GetDrillFormDetail(Id);
     ">
    <div class="load" ng-show="DataLoading">
        <div class="loader">
            <svg version="1.1" id="loader-1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
            <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
            <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite" />
			</path>
		</svg>
            <div class="load-msg" ng-bind="LoadingMsg"></div>
        </div>
    </div>
    <div class="page-heading">
        <h1>编辑应急演练</h1>
        <div class="options">
            <div class="btn-toolbar">

            </div>
        </div>
    </div>
    <ol class="breadcrumb">
        <li><a>主体业务</a></li>
        <li><a>应急管理</a></li>
        <li><a>应急演练</a></li>
        <li class="active"><a>编辑应急演练</a></li>
    </ol>

    <div class="container-fluid">
        <div class="row">
            <form class="form-horizontal row-border">
                <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading"><h2>编辑应急演练</h2></div>
                        <div class="panel-body">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">园区：</label>
                                <div class="col-sm-8">
                                    <select class="form-control" ng-model="DrillFormDetail.ParkId" ng-change="GetPlaceList('placelist',AddModel.ParkId);">
                                        <option value="">选择园区</option>
                                        <option ng-repeat="x in ParkList" value="{{x.Id}}">{{x.ParkName}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">场所：</label>
                                <div class="col-sm-8">
                                    <select id="placelist" class="form-control" ng-model="DrillFormDetail.PlaceId" ng-init="DrillFormDetail.PlaceId=PlaceId" ng-change="refreshOption('placelist');" data-live-search="true">
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">演练时间：</label>
                                <div class="col-sm-8">
                                    <datepicker id="startTime" option="datetimeOption" format="L HH:mm" ng-model="DrillFormDetail.DrillTime"></datepicker>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">组织部门：</label>
                                <div class="col-sm-8">
                                    <select id="dep_select" class="form-control" ng-model="DrillFormDetail.DepartmentId" ng-change="refreshOption('dep_select');" data-live-search="true">
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">参加人员：</label>
                                <div class="col-sm-8">
                                    <textarea type="text" ng-model="DrillFormDetail.Member" placeholder="参加人员" rows="4" maxlength="500" class="form-control"></textarea>
                                    @*<span class="control-label label label-alizarin" ng-show="ChoosenEmployeeList.length==0">未选任何参加人员</span>
                <span class="control-label label label-success" ng-show="ChoosenEmployeeList.length>0" ng-repeat="x in ChoosenEmployeeList" style="margin-right:10px;margin-top:10px;">{{x.EmployeeNo}}-{{x.EmployeeName}}</span>*@
                                </div>
                                @*<div class="col-sm-1">
                <a data-toggle="modal" href="#CheckOptionModal" class="btn btn-primary">选择参加人员</a>
            </div>*@
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">演练类型：</label>
                                <div class="col-sm-8">
                                    <select id="placelist" class="form-control" ng-model="DrillFormDetail.TypeId">
                                        <option value="" selected>请选择演练类型</option>
                                        <option value="1">桌面演练</option>
                                        <option value="2">功能演练</option>
                                        <option value="3">全面演练</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">总结概要：</label>
                                <div class="col-sm-8">
                                    <textarea type="text" ng-model="DrillFormDetail.Summary" placeholder="总结概要" rows="8" maxlength="1000" class="form-control"></textarea>
                                </div>
                                <label class="control-label">{{DrillFormDetail.Summary.length}}/1000</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">备注：</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" ng-model="DrillFormDetail.Remark" maxlength="500" />
                                </div>
                                <label class="control-label">{{DrillFormDetail.Remark.length}}/500</label>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">文件列表：</label>
                                <div class="col-sm-8">
                                    <table class="table table-striped table-bordered table-hover">
                                        <thead>
                                            <tr style="background-color:blueviolet;">
                                                <th style="width:5%">序号</th>
                                                <th style="width:30%">文件名称</th>
                                                <th style="width:10%">文件大小(kb)</th>
                                                <th style="width:10%">操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr ng-show="DrillFormDetail.FileList.length==0">
                                                <td colspan="4" style="text-align:center;vertical-align:middle;line-height:30px;">没有数据</td>
                                            </tr>
                                            <tr ng-repeat="x in DrillFormDetail.FileList">
                                                <td ng-bind="$index+1"></td>
                                                <td ng-bind="x.FileName"></td>
                                                <td ng-bind="x.FileSize"></td>
                                                <td>
                                                    <a href="../Download/DownloadFile?FileId={{x.FileId}}" class="btn btn-success btn-xs btn-label"><i class="fa fa-download"></i>下载</a>
                                                    <a ng-click="DeleteDrillFormFile(x.FileId,DrillFormDetail.FileList);" class="btn btn-danger btn-xs btn-label"><i class="fa fa-trash-o"></i>删除</a>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-1 control-label">上传附件<span class="not-null"></span></label>
                                <div class="col-lg-8">
                                    <input type="file" ngf-select ng-model="doc.Files" name="docfiles" id="docfiles" class="file" initialPreviewAsData="true" data-show-remove="true" data-show-preview="true" showCancel="false" data-show-upload="false" multiple required>
                                </div>
                            </div>
                            <div class="panel-footer">
                                <div class="col-sm-3">

                                </div>
                                <div class="col-sm-1">
                                    <button ng-click="EditDrillForm(DrillFormDetail,page);" class="btn btn-primary">提交</button>
                                </div>
                                <div class="col-sm-1">
                                    <a href="DrillFormPageList?page={{page}}" class="btn btn-default">返回</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>

</div>


@section Js{
    <script src="~/Assets/js/pg/Emergency.js?v=@DateTime.Now.ToString("yyMMddHHmm")"></script>
    <script src="~/Assets/js/libs/moment.min.js"></script>
    <script src="~/Assets/js/libs/locales/date/zh-cn.js"></script>
    <script src="~/Assets/js/libs/bootstrap-datetimepicker.min.js"></script>
    <script src="~/Assets/js/libs/angularjs-datepicker.js"></script>
    <script src="~/Assets/js/libs/fileinput.js"></script>
    <script src="~/Assets/js/libs/zh.js"></script>
    <script>
        $('#docfiles').fileinput({
            language: 'zh'
        });
    </script>
}


